x = int(input())
sums = 0
while True:
    if x % 10 == 0:
        break
    x += 1
    sums +=1
print(sums)

print((10-x%10)%10)

'''
while x%10 != 0:
    x+=1
    count += 1
print(count)
'''
